using System;
using System.Collections.Generic;
using System.Text;

namespace Zsa.Emulation.Cartridge
{
    /// <summary>
    /// The roms flags.
    /// </summary>
    [Flags()]
    public enum RomFlags : byte
    {
        Unknown = 0,
        /// <summary>
        /// Use vertical mirroring
        /// </summary>
        VerticalMirroring = 1,
        /// <summary>
        /// Rom has a battery pack.
        /// </summary>
        BatteryPackRam = 2,
        /// <summary>
        /// Rom has a trainer.
        /// </summary>
        HasTrainer = 4 ,
        /// <summary>
        /// Use for screen mirroring.
        /// </summary>
        FourScreenMirroring = 8,
        /// <summary>
        /// 
        /// </summary>
        VSCart = 16,
        /// <summary>
        /// True if pal cart.
        /// </summary>
        IsPal = 32
    }





    /// <summary>
    /// The different types of memory in 
    /// roms that can be inside a nes cartridge.
    /// </summary>
    /// <summary>
    /// The memory type.
    /// </summary>
    public enum RomBankType : byte
    {
        /// <summary>
        /// Unknown.
        /// </summary>
        Unknown = 0,
        /// <summary>
        /// The program rom.
        /// </summary>
        ProgramRom = 1,
        /// <summary>
        /// The video rom bank one.
        /// </summary>
        ProgramRomOne = ProgramRom,
        /// <summary>
        /// The video rom bank two.
        /// </summary>
        ProgramRomTwo = ProgramRom | BankTwoFlag,
        /// <summary>
        /// Video rom.
        /// </summary>
        VideoRom = 2,
        /// <summary>
        /// The video rom bank one.
        /// </summary>
        VideoRomOne = VideoRom,
        /// <summary>
        /// The second video rom.
        /// </summary>
        VideoRomTwo = VideoRom | BankTwoFlag,
        /// <summary>
        /// Indicates a battery pack.
        /// </summary>
        BatteryPack = 4,
        /// <summary>
        /// Indicates a trainer rom.
        /// </summary>
        Trainer = 8,
        /// <summary>
        /// Indicates a mirrored bank.
        /// </summary>
        MirrorFlag = 1 << 6,
        /// <summary>
        /// Indicates second bank.
        /// </summary>
        BankTwoFlag = 1 << 7


    }

    public enum CartFileFlags
    {
        Unknown = 0,
        /// <summary>
        /// The cart file is temporary from copy 
        /// </summary>
        TempCart = 1,

        /// <summary>
        /// Unable to find the cart.
        /// </summary>
        Unresolved = 2

    }
}
